package po;


import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * <p>  
 *  TbMsg 消息表
 * </p>
 * @author  XieTao
 * @date 2020-04-10 
 */


public class TbMsg  implements Serializable {


	/**
	 * 消息ID
	 */
	private String mid;

	/**
	 * 消息内容
	 */
	private String content;

	/**
	 * 发送时间
	 */
	private Date sendTime;

	/**
	 * 接收时间
	 */
	private Date receiveTime;

	/**
	 * 发送人
	 */
	private String sendUser;

	/**
	 * 接收方
	 */
	private String received;

	/**
	 * 消息类型（群消息OR用户消息）
	 */
	private Integer type;

	/**
	 * 消息状态
	 */
	private Integer state;

	/**
	 * 扩展信息
	 */
	private String ext;

	public String getMid() {
		return mid;
	}

	public void setMid(String mid) {
		this.mid = mid;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}

	public Date getReceiveTime() {
		return receiveTime;
	}

	public void setReceiveTime(Date receiveTime) {
		this.receiveTime = receiveTime;
	}

	public String getSendUser() {
		return sendUser;
	}

	public void setSendUser(String sendUser) {
		this.sendUser = sendUser;
	}

	public String getReceived() {
		return received;
	}

	public void setReceived(String received) {
		this.received = received;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public String getExt() {
		return ext;
	}

	public void setExt(String ext) {
		this.ext = ext;
	}

	@Override
	public String toString() {
		return "TbMsg{" +
				"mid='" + mid + '\'' +
				", content='" + content + '\'' +
				", sendTime=" + sendTime +
				", receiveTime=" + receiveTime +
				", sendUser='" + sendUser + '\'' +
				", received='" + received + '\'' +
				", type=" + type +
				", state=" + state +
				", ext='" + ext + '\'' +
				'}';
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof TbMsg)) {
			return false;
		}
		TbMsg tbMsg = (TbMsg) o;
		return Objects.equals(mid, tbMsg.mid) &&
				Objects.equals(content, tbMsg.content) &&
				Objects.equals(sendTime, tbMsg.sendTime) &&
				Objects.equals(receiveTime, tbMsg.receiveTime) &&
				Objects.equals(sendUser, tbMsg.sendUser) &&
				Objects.equals(received, tbMsg.received) &&
				Objects.equals(type, tbMsg.type) &&
				Objects.equals(state, tbMsg.state) &&
				Objects.equals(ext, tbMsg.ext);
	}

	@Override
	public int hashCode() {
		return Objects.hash(mid, content, sendTime, receiveTime, sendUser, received, type, state, ext);
	}
}
